package com.bdqn.t320.controller;

import com.bdqn.t320.entity.User;
import com.bdqn.t320.service.UserService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RestController
public class UserController {

    @Resource
    UserService userService;

    @RequestMapping("/hello/{uname}")
    public Object hello(@PathVariable("uname") String uname) {
        System.out.println("uname:" + uname);

        User user = new User();
        user.setUname(uname);
        int i = userService.addUserBiz(user);
        return i;
    }
}
